package com.gwz.cardserver.consts;

public enum CardColorEnums {
    NONE(0),
    /**
     * 梅花
     */
    CLUB(1),
    /**
     * 红桃
     */
    HEART(2),
    /**
     * 黑桃
     */
    SPADE(3),
    /**
     * 方块
     */
    SQUARE(4),
    ;

    private int code;
    private String value;

    CardColorEnums(int code) {
        this.code = code;
    }

    public static CardColorEnums getByCode(int code) {
        for (CardColorEnums value : values()) {
            if (value.code == code) {
                return value;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
